☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

label

Table of contents

Description:

This key defines the label used for a file sorting option in the Sort dropdown.

Appears in:
└── collections_config
    └── *
        └── sort_options
            └── [*]
                └── label
Type:
string
Examples:

In this example, the sorting method which uses the author key is called "Author (A-Z)" in the Sort dropdown.

Copied to clipboard
collections_config:
  blog:
    sort_options:
      - key: author
        order: ascending
        label: Author (A-Z)
{
  "collections_config": {
    "blog": {
      "sort_options": [
        {
          "key": "author",
          "order": "ascending",
          "label": "Author (A-Z)"
        }
      ]
    }
  }
}
Open in a new tab